$(document).ready(function() {
  require(["inputdrop", "tree"], function(inputdrop, tree) {
    var current_selected_node_id = "";

    var key;
    $("input[placeholder]").placeholder();

    function view_init() {
      $("#content_div").css("padding", "0");
      $("#pg-content").css("padding", "0");
    }

  

    // 移动终端指标库表格配置
    var list_col = [
      { text: "", name: "t", width: 3, hideSearch: "hide" },
      { text: "指标名称", name: "name", align: "left", width: 40, tip: true },
      { text: "单位", name: "name", align: "left", width: 40, tip: true }
    ];

  
    var configUrl = "api/property/type/list";
    function terminal_target_list(option) {
      g_grid.render($("#table_div1"), {
        header: list_col,
        url: configUrl,
        type: "xd",
        dataKey: "list",
        // oper: list_oper,
        operWidth: "60px",
        paramObj: option.paramObj,
        queryBefore: function(paramObj) {
          if (current_selected_node_id != -1) {
            paramObj.categoryId = current_selected_node_id;
          }
        },
        isLoad: option.isLoad,
        maskObj: option.maskObj,
        hasBorder: false,
        hideSearch: true,
        autoHeight: true,
        showCount: true,
        allowCheckBox: false
      });
    }

    terminal_target_list({
      paramObj: { pageSize: 50 },
      isLoad: true,
      maskObj: "body"
    });
  });
});
